//
//  ZYPBCore.h
//  ZYWebImage
//
//  Created by wangzhipan on 2025/4/25.
//

#import <Foundation/Foundation.h>
#import "IPBToken.h"


NS_ASSUME_NONNULL_BEGIN

@interface ZYPBCore : NSObject
+ (instancetype)sharedCore;

- (void)startConnect;
- (void)disconnect;

- (void)registerPBForMax:(uint32_t)maxType
                     min:(uint32_t)minType
            requestClass:(Class)requestClass
           responseClass:(Class)responseClass;

- (void)sendPBRequest:(GPBMessage *)request
       completedBlock:(ZYPBCompletedBlock)completedBlock;

- (id<IPBToken>)registerPBNotificationForMax:(uint32_t)maxType
                                         min:(uint32_t)minType
                               responseClass:(Class)responseClass
                              completedBlock:(ZYPBCompletedBlock)completedBlock;

- (void)removePBToken:(id<IPBToken>)token ForKey:(NSString *)key;

- (void)clearAllData;

- (void)clearAllDataAsync;
@end

NS_ASSUME_NONNULL_END
